Main types of transformers
Transformers can be grouped into three categories according to the form of the input and output data
In a problem such as sentiment analysis, we take a sequence of words as input and provide a single variable representing the sentiment of the text, for example happy or sad, as output
Here a transformer is acting as an encoder of the sequence